﻿<Page x:Class="MoreEPG.View.Sort"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:Helper="clr-namespace:Wpf.DragDrop;assembly=Wpf.DragDrop"
        mc:Ignorable="d"
        d:DesignHeight="400"
        d:DesignWidth="550"
        DataContext="{Binding SortModel, Source={StaticResource Locator}}">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Skins/Theme.xaml" />
                <ResourceDictionary Source="/Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <Border x:Name="Border2" Grid.Column="1" Margin="3" BorderBrush="GhostWhite" BorderThickness="1" CornerRadius="10">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="0.4*"></RowDefinition>
                <RowDefinition Height="4*"></RowDefinition>
                <RowDefinition Height="0.6*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5" Content="Sendersortierung :" FontSize="12" HorizontalAlignment="Left" Foreground="White">
                <Label.Effect>
                    <DropShadowEffect></DropShadowEffect>
                </Label.Effect>
            </Label>
            <ListView HorizontalAlignment="Left" 
                      Width="490" 
                      HorizontalContentAlignment="Stretch" 
                      VerticalContentAlignment="Stretch" 
                      Grid.ColumnSpan="3" 
                      Background="{StaticResource SteelBrush}" 
                      Grid.Column="0" 
                      Grid.Row="1" 
                      Margin="10" 
                      ItemsSource="{Binding Items}"
                      Helper:DragDrop.IsDragSource="True"
                      Helper:DragDrop.IsDropTarget="True"
                      Helper:DragDrop.DragAdornerTemplate="{DynamicResource DragTemplate}"
                      Helper:DragDrop.DropHandler="{Binding}"
                      AllowDrop="True">
                <ListView.Resources>
                    <ResourceDictionary Source="/Skins/SortListViewStyle.xaml" ></ResourceDictionary>
                </ListView.Resources>
                <ListView.View>
                    <GridView AllowsColumnReorder="False">
                        <GridViewColumn Header="Num" Width="45" ></GridViewColumn>
                        <GridViewColumn Header="Channel" Width="80"  />
                        <GridViewColumn Header="Service"  Width="180"></GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>
            <Button  Style="{DynamicResource RoundedButton}"
                     ToolTip="Save to Media Center"
                     Grid.Column="0" 
                     Margin="10,0,0,0"
                     Grid.Row="2" 
                     Width="60" 
                     Height="25" 
                     Background="LightSteelBlue" 
                     Content="Save" 
                     Command="{Binding Save}"
                     HorizontalAlignment="Left">
            </Button>
        </Grid>
    </Border>
</Page>
